"""
Author: Lucas
Date: 2024-05-13 03:05:25
LastEditors: Lucas
LastEditTime: 2024-05-16 07:05:54
Description: file content
"""

import akshare as ak
import pandas as pd

# start_date = "20240413"
# end_date = "20240513"

# stock_zh_a_hist_df = ak.stock_zh_a_hist(
#     symbol="600519",
#     period="daily",
#     start_date=start_date,
#     end_date=end_date,
#     adjust="hfq",
# )
# print(stock_zh_a_hist_df)

report_date = [
    "20200331",
    "20200630",
    "20200930",
    "20201231",
    "20210331",
    "20210630",
    "20210930",
    "20211231",
    "20220331",
    "20220630",
    "20220930",
    "20221231",
    "20230331",
    "20230630",
    "20230930",
    "20231231",
    "20240331",
]


result_df = pd.DataFrame()
for date in report_date:
    stock_yjbb_em_df = ak.stock_yjbb_em(date=date)
    tmp_df = stock_yjbb_em_df[stock_yjbb_em_df["股票代码"] == "600519"]
    result_df = pd.concat([result_df, tmp_df], axis=0, ignore_index=True)
    # print(result_df)

    # result_df.to_excel("mt.xlsx", index=False)
